package com.padakeji.android.pworks.module.version.view;

import android.content.res.Resources;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.TextView;
import com.padakeji.android.pworks.R;
import com.padakeji.android.pworks.app.PadaActivity;
import com.padakeji.android.pworks.module.version.VersionController;
import com.padakeji.android.pworks.module.version.entity.VersionInfo;

/**
 * Created by AtanL on 2015/5/9.
 */
public class UpdateDialogActivity extends PadaActivity {

    private TextView test;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.version_update_activity);

        Bundle bundle = getIntent().getExtras();
        int versionCode = bundle.getInt(VersionController.ARGS_KEY_VERSION_CODE, 0);
        String versionName = bundle.getString(VersionController.ARGS_KEY_VERSION_NAME, "");
        String downloadLink = bundle.getString(VersionController.ARGS_KEY_DOWNLOAD_LINK, "");
        String releaseNotes = bundle.getString(VersionController.ARGS_KEY_RELEASE_NOTES, "");

        VersionInfo vi = new VersionInfo();
        vi.versionCode = versionCode;
        vi.versionName = versionName;
        vi.downloadLink = downloadLink;
        vi.releaseNotes = releaseNotes;

        UpdateDialogFragment frag = UpdateDialogFragment.newInstance(vi);
        frag.show(getFragmentManager(), "UpdateDialog");
    }

}
